package com.qf.xiaomi.service.impl;

import com.qf.xiaomi.dao.impl.ProductDaoImpl;
import com.qf.xiaomi.pojo.PageBen;
import com.qf.xiaomi.pojo.TbGoodsKz;
import com.qf.xiaomi.service.IProductService;

/**
 * @Created by 马英超 on 2022/8/17 19:28
 * @author： 马英超
 * @version：v1.0
 * @description:
 */
public class ProductServiceImpl implements IProductService {
    @Override
    public PageBen queryProduct(String typeID, PageBen pageBen) {
        ProductDaoImpl productDao=new ProductDaoImpl();
        PageBen  pageBen1= productDao.queryPageBen(typeID,pageBen);
        if (pageBen1!=null)
            return pageBen1;
        return null;
    }

    @Override
    public TbGoodsKz queryGoodsById(String productId) {
        //参数处理
        int id=Integer.parseInt(productId);
        //调用Dao
        ProductDaoImpl productDao=new ProductDaoImpl();
        TbGoodsKz goodsKz =   productDao.queryProductById(id);
        if (goodsKz!=null)
            return goodsKz;
        return null;
    }


}
